<!-- 电子巡更 》 电子地图 -->

<template>
  <CommonBody class="PatrolMap" v-bind="bodyProps" noPadding @change="toChange">
    <template #treeNode="{ data, nodeClass }">
      <AreaNode :data="data" :nodeClass="nodeClass" />
    </template>

    <div v-if="map_info.id">
      <MapView />
    </div>

    <MapEmpty v-else />

    <MyTab />

    <MyPatrol />

    <PointModal />
  </CommonBody>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import store from './store'
import PatrolGaode from '../PatrolGaode'
import mixMap from '@admin/views/Secure/mixMap'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'PatrolMap',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [mixMap('16', store)],

  /**
   * 组件导入 (Abc.vue + Abc/index.vue)
   */
  ...CORE.components(
    require.context('../PatrolGaode', true, /vue$/),
    require.context('./', true, /vue$/),
  ),

  /**
   * 监听属性 (深度 deep 首次 immediate)
   */
  watch: PatrolGaode.watch,
}
</script>
